<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8"/>
    <title>Login | Coco - Responsive Bootstrap Admin Template</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />

</head>
<body >
include标签
<footer th:fragment="copy">
    &copy; 2016
</footer>
<div th:include="/page/common/foot :: copy"></div>
<div th:replace="/page/common/foot :: copy"></div>
onclick标签
<button th:onclick="'getCollect()'">点击</button>

<span th:text="${book.name}"/>
<input type="text" name="userName"  value="gmg" th:value="${user.name}" />
<img src="qr-code.jpg" th:src="@{${path}}" alt="二维码" />
href标签
<a href="main.html" th:href="@{/main}">
简单数字和时间转换
<dt>价格</dt>
<dd th:text="${#numbers.formatDecimal(product.price, 1, 2)}">180</dd>
<dt>进货日期</dt>
<dd th:text="${#dates.format(product.availableFrom,'yyyy-MM-dd')}">2014-12-01</dd>
字符串拼接
<dd th:text="${'$'+product.price}">235</dd>
表单中
<form th:action="@{/bb}" th:object="${user}" method="post" th:method="post">
    <input type="text" th:field="*{name}"/>
    <input type="text" th:field="*{msg}"/>
    <input type="submit"/>
</form>
<table>
    <tr>
        <th>NAME</th>
        <th>PRICE</th>
        <th>IN STOCK</th>
    </tr>
    <tr th:each="prod : ${prods}">
        <td th:text="${prod.name}">Onions</td>
        <td th:text="${prod.price}">2.41</td>
        <td th:text="${prod.inStock}? #{true} : #{false}">yes</td>
    </tr>
</table>
条件判断
<span th:if="${product.price lt 100}" class="offer">Special offer!</span>
select选项
<select th:field="${resume.gender}" class="form-control" th:switch="${resumes.gender.toString()}"
        data-required="true">
    <option value="男" th:case="'男'" th:selected="selected" >男</option>
    <option value="女" th:case="'女'" th:selected="selected" >女</option>
    <option value="">请选择</option>
</select>
</body>
</html>